<%-- 
    Document   : login
    Created on : 2010-08-31, 09:46:15
    Author     : ko
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">


<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Logowanie</title>
        <script   >
    function trim(s)
    {
        return s.replace( /^\s*/, "" ).replace( /\s*$/, "" );
    }

    function validate()
    {
        if(trim(document.frmLogin.un.value)=="")
        {
          alert("Podaj login");
          document.frmLogin.un.focus();
          return false;
        }
        else if(trim(document.frmLogin.pw.value)=="")
        {
          alert("Podaj haslo");
          document.frmLogin.pw.focus();
          return false;
        }
    }
</script>

    </head>
    <body>
    
<form name="frmLogin" onSubmit="return validate();" action="loginServlet" method="get">
Login <input type="text" name="un" /><br />
Hasło <input type="password" name="pw" /><br />
<input type="submit" name="sSubmit" value="Zaloguj" />
</form>

    </body>
</html>
